"""
@author: ZY
@Time: 2021/10/07
"""
import requests


class Login:
    """登录封装
    """

    def B_login(self, account="15171438507", pwd="Q3hsOTQwNDA2"):
        """B端登录
        """
        # base_url = 'https://b-test.health.sina.cn/api/bcustomer/login?'
        # uri = 'phone={0}&password={1}&token=&bId=5fb72a5de8628500063ffcd4'.format(account, pwd)
        # url = base_url + uri
        # response = requests.get(url)
        # return response.json()['data']['token']
        return "OK"

    def H5_login(self, account='15171438507', checkNum='123456'):
        """C端登录
        """
        # url = 'https://test.health.sina.cn/midauth/user/login/phone'
        # data = {
        #     "phone": account,
        #     "checkNum": checkNum,
        #     "loginSource": "patient",
        #     "source": "h5"
        # }
        # response = requests.post(url=url, json=data)
        # return response.json()['data']['token']
        return "OK"


Login = Login()

if __name__ == '__main__':
    A = Login.B_login()
    print(A)
    B = Login.H5_login()
    print(B)
